package com.daervin.svc.pipeline;

import com.daervin.svc.dal.model.Resume;
import com.daervin.svc.service.IResumeService;
import us.codecraft.webmagic.ResultItems;
import us.codecraft.webmagic.Task;
import us.codecraft.webmagic.pipeline.PageModelPipeline;
import us.codecraft.webmagic.pipeline.Pipeline;

/**
 * @packageName: com.daervin.svc.pipeline
 * @CLassName: ResumePopeline
 * @Description:
 * @Author: wanxiong.deng
 * @Date: 2021/4/25 18:57
 */

/**
 * 管道的处理类，然后的话把从网上爬取的数据保存到数据库
 * @author WEIMOB
 */
public class ResumePipeline implements Pipeline {

    private IResumeService iResumeService;
    public ResumePipeline(IResumeService service){
        this.iResumeService = service;
    }


    @Override
    public void process(ResultItems resultItems, Task task) {
        Resume resume = resultItems.get("resume");
        System.out.println(resume.toString());
    }
}
